import 'package:flutter/material.dart';

final ThemeData lightThemeData = ThemeData(
  primarySwatch: Colors.blue,
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.white,
  appBarTheme: const AppBarTheme(
    backgroundColor: Colors.blue,
    elevation: 0, // 移除阴影
    titleTextStyle: TextStyle(
      color: Colors.white,
      fontSize: 20,
      fontWeight: FontWeight.bold,
    ),
    iconTheme: IconThemeData(color: Colors.white), // AppBar图标颜色
  ),
  bottomNavigationBarTheme: const BottomNavigationBarThemeData(
    backgroundColor: Colors.white,
    selectedItemColor: Colors.blue,
    unselectedItemColor: Colors.grey,
  ),
  textTheme: const TextTheme(
    bodyLarge: TextStyle(color: Colors.black, fontSize: 16), // 原 bodyText1
    bodyMedium: TextStyle(color: Colors.black54, fontSize: 14), // 原 bodyText2
    titleLarge: TextStyle(color: Colors.black, fontSize: 20, fontWeight: FontWeight.bold), // 原 headline6
  ),
  elevatedButtonTheme: ElevatedButtonThemeData(
    style: ButtonStyle(
      backgroundColor: MaterialStateProperty.all(Colors.blue), // 按钮背景颜色
      foregroundColor: MaterialStateProperty.all(Colors.white), // 按钮文本颜色
      padding: MaterialStateProperty.all(EdgeInsets.symmetric(vertical: 12, horizontal: 20)), // 按钮内边距
      textStyle: MaterialStateProperty.all(TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), // 按钮文本样式
    ),
  ),
);

final ThemeData darkThemeData = ThemeData(
  brightness: Brightness.dark,
  primarySwatch: Colors.blue,
  scaffoldBackgroundColor: Colors.black,
  appBarTheme: const AppBarTheme(
    backgroundColor: Colors.black,
    elevation: 0, // 移除阴影
    titleTextStyle: TextStyle(
      color: Colors.white,
      fontSize: 20,
      fontWeight: FontWeight.bold,
    ),
    iconTheme: IconThemeData(color: Colors.white), // AppBar图标颜色
  ),
  bottomNavigationBarTheme: const BottomNavigationBarThemeData(
    backgroundColor: Colors.black,
    selectedItemColor: Colors.blue,
    unselectedItemColor: Colors.grey,
  ),
  textTheme: const TextTheme(
    bodyLarge: TextStyle(color: Colors.white, fontSize: 16), // 原 bodyText1
    bodyMedium: TextStyle(color: Colors.white70, fontSize: 14), // 原 bodyText2
    titleLarge: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.bold), // 原 headline6
  ),
  elevatedButtonTheme: ElevatedButtonThemeData(
    style: ButtonStyle(
      backgroundColor: MaterialStateProperty.all(Colors.blue), // 按钮背景颜色
      foregroundColor: MaterialStateProperty.all(Colors.white), // 按钮文本颜色
      padding: MaterialStateProperty.all(EdgeInsets.symmetric(vertical: 12, horizontal: 20)), // 按钮内边距
      textStyle: MaterialStateProperty.all(TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), // 按钮文本样式
    ),
  ),
);
